<!--
 * @Author: your name
 * @Date: 2021-04-07 15:12:13
 * @LastEditTime: 2021-04-27 18:40:46
 * @LastEditors: Please set LastEditors
 * @Description: 新闻与更新
 * @FilePath: /medicine-web/src/views/news/index.vue
-->
<template>
  <div class="new-update-container">
    <p class="new-update-title">新闻与更新</p>
    <ul class="new-update__content">
      <li v-for="item in newsList" :key="item.id" style="margin-bottom: 34px;">
        <div class="news-title font-pattern-7">{{item.title}}</div>
        <div class="news-content font-pattern-3">{{item.describe}}</div>
        <div class="font-pattern-3">{{item.update_time}}</div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'newsUpdate',
  data () {
    return {
      newsList: []
    }
  },
  methods: {
    async fetchData () {
      this.newsList = await this.$action('getUpdateData')
      console.log('getUpdateData', this.newsList)
    }
  },
  mounted () {
    this.fetchData()
  }
}
</script>
<style lang="scss" scoped>
@import '~@/assets/styles/flex.scss';
@import '~@/assets/styles/common.scss';
.new-update-container {
  width: 1100px;
  padding: 58px 0px 121px 0px;
  margin: 0 auto;
  min-height: calc(100vh - 558px);
  .new-update-title {
    text-align: center;
    font-size: 1.25rem;
    color: #555555;
    font-weight: bold;
    margin-bottom: 25px;
  }
  .new-update__content {
    li {
      cursor: pointer;
    }
    .news-title {
      padding-bottom: 12px;
    }
    .news-content {
      padding-bottom: 17px;
    }
  }
}
</style>
